#!/bin/bash

#cat ./rawdata.alexa | xargs -n 2 ../bin/phantomjs ./loadpage.js $1 $2 | grep -E '^(yes|no|timeout)' >> alexa.final

rm ./alexa.final
while read line;
do echo $line | xargs -n 2 ../bin/phantomjs ./loadpage.js $1 $2 | awk '/^(yes|no|timeout)/{for (i=2;i<NF;++i) printf "%s ", $i; printf "%s\n", $NF;}' >> ./alexa.final
done < ./rawdata.alexa
